package com.dj.pojo;

/**
 * 微信公众号调用接口集
 * @author Jon
 *
 */
public class WeixinUrl {

	/**
	 * 微信接口地址前缀
	 */
	public static final String BASE_URL = "https://api.weixin.qq.com/";
	
	/** 
     * 获取token
     */  
    public static final String ACCESS_TOKEN_URL = BASE_URL + "cgi-bin/token?grant_type=client_credential&appid=APPID&secret=APPSECRET"; 
  
    /** 
     * 创建菜单
     */  
    public static final String CREATE_MENU_URL = BASE_URL + "cgi-bin/menu/create?access_token=ACCESS_TOKEN";  
  
    /** 
     * 上传文件
     */  
    public static final String UPLOAD_URL = BASE_URL + "cgi-bin/media/upload?access_token=ACCESS_TOKEN&type=TYPE"; 
    
    /** 
     * 用户授权,获取code
     */  
    public static final String AUTH_OPENID_URL = BASE_URL + "connect/oauth2/authorize?appid=APPID&redirect_uri=REDIRECT_URI&response_type=code&scope=SCOPE&state=STATE#wechat_redirect"; 


    /** 
     * 通过code换取网页授权access_token
     */ 
    public static final String WEB_ACCESS_TOKEN_URL = BASE_URL + "sns/oauth2/access_token?appid=APPID&secret=SECRET&code=CODE&grant_type=authorization_code"; 

    /** 
     * 通过网页授权获取用户信息
     */  
    public static final String USER_INFO_URL = BASE_URL + "sns/userinfo?access_token=ACCESS_TOKEN&openid=OPENID"; 
}
